
import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  // mode: 'history',
  // base: process.env.BASE_URL,
  
  routes: [
    {
      path: "/",
      redirect: "/Login",
      meta: {
      }
    },
    {
      path: "/Login",
      name: "Login",
      component: () => import('@/views/Login'),
      meta: {
      }
    },
    {
      path: "/Home",
      name: "Home",
      component: () => import( '../views/Home.vue'),
      meta: {
      }
    },
    {
      path: "/About",
      name: "About",
      component: () => import( '../views/About.vue'),
      meta: {
      }
    },
    {
      path: '/index',
      name: 'index',
      redirect: '/index/InstructionalDesign',
      component: () => import('@/views/index'),
      children: [
        {
          path: 'InstructionalDesign',
          name: 'InstructionalDesign',
          component: () => import('@/views/InstructionalDesign'),
          meta: {
            primaryMenuName: 'InstructionalDesign',
          }
        },
        {
          path: 'CourseLearn',
          name: 'CourseLearn',
          component: () => import('@/views/CourseLearn'),
          meta: {
            primaryMenuName: 'CourseLearn',
          }
        },
      ]
    },
  ]
})

const routerPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return routerPush.call(this, location).catch(error => error)
}







// import Vue from 'vue'
// import VueRouter from 'vue-router'

// Vue.use(VueRouter)

// const routes = [
//   {
//     path: '/',
//     name: 'InstructionalDesign',
//     component: () => import(/* webpackChunkName: "InstructionalDesign" */ '../views/InstructionalDesign.vue')
//   },
//   {
//     path: '/InstructionalDesign',
//     name: 'InstructionalDesign',
//     component: () => import(/* webpackChunkName: "InstructionalDesign" */ '../views/InstructionalDesign.vue')
//   }
// ]

// const router = new VueRouter({
//   mode: 'history',
//   base: process.env.BASE_URL,
//   routes
// })

// export default router
